package com.ruoyi.littleRedBook.domain.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("products")
public class Product {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("seller_id")
    private Long sellerId;

    @TableField("category_id")
    private Long categoryId;

    private String title;

    private String description;

    private BigDecimal price;

    @TableField("original_price")
    private BigDecimal originalPrice;

    private String images; // 存储JSON格式的图片URL数组，用String接收后续可转换

    private Integer status; // 0-待审核 1-审核通过 2-审核驳回 3-已下架 4-已售出

    @TableField("reject_reason")
    private String rejectReason;

    @TableField("view_count")
    private Integer viewCount;

    @TableField("like_count")
    private Integer likeCount;

    private Integer stock;

    @TableField("is_new")
    private Integer isNew; // 0-二手 1-全新

    @TableField("quality_grade")
    private Integer qualityGrade; // 1-优 2-良 3-中 4-差

    @TableField("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    private LocalDateTime updatedAt;
}
